
env=2


# 使用端口

portList=(
    8600
)
for(( i=0;i<${#portList[@]};i++)) do
    port=${portList[i]}
echo "port="$port
pm2 start web_server/WebServer.js --name WebServer-$port   --output="./logs/WebServer"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS"   -- $port $env
done;

portList=(
    8300
)
for(( i=0;i<${#portList[@]};i++)) do
    port=${portList[i]}
echo "port="$port
pm2 start account_server/account_server.js --name account_server-$port   --output="./logs/account_server"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS" -- $port $env
done;

portList=(
    8400
)
for(( i=0;i<${#portList[@]};i++)) do
    port=${portList[i]}
echo "port="$port
pm2 start gm_server/gm_server.js --name gm_server-$port   --output="./logs/gm_server"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS"   -- $port $env
done;

portList=(
    8500
)
for(( i=0;i<${#portList[@]};i++)) do
    port=${portList[i]}
echo "port="$port
pm2 start log_server/log_server.js --name log_server-$port   --output="./logs/log_server"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS" -- $port $env
done;


portList=(
    8700
)
for(( i=0;i<${#portList[@]};i++)) do
    port=${portList[i]}
echo "port="$port
pm2 start hall_server/hall_server.js --name hall_server-$port   --output="./logs/hall_server"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS" -- $port $env
done;


# portList=(
#     11000
#     # 11002
# )
# for(( i=0;i<${#portList[@]};i++)) do
#     port=${portList[i]}
# echo "port="$port
# pm2 start mj_server/mj_server.js --name mj_server-$port   --output="./logs/mj_server"-$port".log" --log-date-format="YYYY-MM-DD HH:mm:ss:SSS" -- $port $env
# done;


